/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Icon } from "antd";
import defaultSettings from "../../defaultSettings";

const FontIcon = Icon.createFromIconfontCN({
  scriptUrl: defaultSettings.iconfontUrl,
});

const KbIcon = props => {
  const { type } = props;
  return type.includes("icon-") ? <FontIcon {...props} /> : <Icon {...props} />;
};

export default KbIcon;
